package com.example.competition_1.models.entity;

import java.util.Random;

public class IdGenerator {
    public static String generateWorkId() {
        long currentTimeMillis = System.currentTimeMillis();
        Random random = new Random();
        // 生成一个1 - 999之间的随机数，可根据需要调整范围
        int randomNumber = random.nextInt(999) + 1;
        long combinedNumber = currentTimeMillis * 1000 + randomNumber;
        return String.valueOf(combinedNumber);
    }
}